<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Vim指令 | 惜缘怀古的博客</title><meta name="keywords" content="惜缘怀古，博客"><meta name="author" content="惜缘怀古"><meta name="copyright" content="惜缘怀古"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="Vim 的基本使用方法Vim快捷键练习神器—-VimTutorVimTutor是新手可以快速入门Vim的一个Vim内置应用，直接在Vim命令行下，敲Vimtutor，回车即可进入练习。 Vim的三种模式Vim可以分为三种模式，分别为：  命令行模式（Command mode）  插入模式（Insert mode）  底行模式（Lastline mode） 命令行模式  控制屏幕光标的移动，字符、字">
<meta property="og:type" content="article">
<meta property="og:title" content="Vim指令">
<meta property="og:url" content="https://xiyuanhuaigu.gitee.io/2022/07/01/Vim%E6%8C%87%E4%BB%A4/index.html">
<meta property="og:site_name" content="惜缘怀古的博客">
<meta property="og:description" content="Vim 的基本使用方法Vim快捷键练习神器—-VimTutorVimTutor是新手可以快速入门Vim的一个Vim内置应用，直接在Vim命令行下，敲Vimtutor，回车即可进入练习。 Vim的三种模式Vim可以分为三种模式，分别为：  命令行模式（Command mode）  插入模式（Insert mode）  底行模式（Lastline mode） 命令行模式  控制屏幕光标的移动，字符、字">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xiyuanhuaigu.gitee.io/img/vimuser.jpg">
<meta property="article:published_time" content="2022-07-01T01:06:31.000Z">
<meta property="article:modified_time" content="2022-07-05T10:08:36.004Z">
<meta property="article:author" content="惜缘怀古">
<meta property="article:tag" content="惜缘怀古，博客">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xiyuanhuaigu.gitee.io/img/vimuser.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://xiyuanhuaigu.gitee.io/2022/07/01/Vim%E6%8C%87%E4%BB%A4/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Vim指令',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-07-05 18:08:36'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if (GLOBAL_CONFIG_SITE.isHome && /iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/2.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">66</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div></div><hr/></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/img/vimuser.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">惜缘怀古的博客</a></span><div id="menus"><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Vim指令</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-07-01T01:06:31.000Z" title="发表于 2022-07-01 09:06:31">2022-07-01</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-07-05T10:08:36.004Z" title="更新于 2022-07-05 18:08:36">2022-07-05</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">1.4k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>4分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Vim指令"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="Vim-的基本使用方法"><a href="#Vim-的基本使用方法" class="headerlink" title="Vim 的基本使用方法"></a>Vim 的基本使用方法</h1><h2 id="Vim快捷键练习神器—-VimTutor"><a href="#Vim快捷键练习神器—-VimTutor" class="headerlink" title="Vim快捷键练习神器—-VimTutor"></a>Vim快捷键练习神器—-VimTutor</h2><p>VimTutor是新手可以快速入门Vim的一个Vim内置应用，直接在Vim命令行下，敲Vimtutor，回车即可进入练习。</p>
<h2 id="Vim的三种模式"><a href="#Vim的三种模式" class="headerlink" title="Vim的三种模式"></a>Vim的三种模式</h2><p>Vim可以分为三种模式，分别为：</p>
<ul>
<li><p>命令行模式（Command mode）</p>
</li>
<li><p>插入模式（Insert mode）</p>
</li>
<li><p>底行模式（Lastline mode）</p>
<p><strong>命令行模式</strong></p>
<blockquote>
<p>控制屏幕光标的移动，字符、字或行的删除，移动复制某区段及进入Insert mode下，或者到 last line mode。</p>
</blockquote>
<p><strong>插入模式</strong></p>
<blockquote>
<p>只有在Insert mode下，才可以做文字输入，按「ESC」键可回到命令行模式。</p>
</blockquote>
<p><strong>底行模式</strong></p>
<blockquote>
<p>将文件保存或退出vim，也可以设置编辑环境，如寻找字符串、列出行号……等。</p>
</blockquote>
</li>
</ul>
<h1 id="Vim的基本操作"><a href="#Vim的基本操作" class="headerlink" title="Vim的基本操作"></a>Vim的基本操作</h1><ol>
<li><p>进入Vim</p>
<p>在系统光标提示符后，输入vim及文件名后，回车，进入Vim编辑画面。</p>
<p>特别注意，进入vim之后，是处于「命令行模式（command mode）」，要切换到「插入模式 （Insert mode）」才能够输入文字。</p>
</li>
<li><p>切换至插入模式（Insert mode）编辑文件<br>在「命令行模式（command mode）」下按一下字母「i」就可以进入「插入模式（Insert mode）」，这时候你就可以开始输入文字了。</p>
</li>
<li><p>插入模式（Insert mode）切换到命令行模式（Command mode）<br>在插入模式下，按一下「ESC」键即可。</p>
</li>
<li><p>退出vim及保存文件 </p>
<p>在命令行模式（Command mode）下，按冒号「:」键，进入底行模式（Last Line mode）</p>
<p>常见底行模式下的命令行：</p>
<blockquote>
<p>:w filename 文件以filename为文件名保存</p>
<p>:wq 文件存盘并退出vim</p>
<p>:q 文件不存盘并退出vim</p>
<p>:q! 文件不存盘强制退出vim</p>
</blockquote>
</li>
</ol>
<h1 id="命令行模式下的功能键（部分）"><a href="#命令行模式下的功能键（部分）" class="headerlink" title="命令行模式下的功能键（部分）"></a>命令行模式下的功能键（部分）</h1><h3 id="在每行行首添加相同的内容："><a href="#在每行行首添加相同的内容：" class="headerlink" title="在每行行首添加相同的内容："></a>在每行行首添加相同的内容：</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">:%s/^/要添加的内容</span><br></pre></td></tr></table></figure>

<h3 id="在每行行尾添加相同的内容："><a href="#在每行行尾添加相同的内容：" class="headerlink" title="在每行行尾添加相同的内容："></a>在每行行尾添加相同的内容：</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">:%s/$/要添加的内容</span><br></pre></td></tr></table></figure>

<h3 id="删除单词："><a href="#删除单词：" class="headerlink" title="删除单词："></a>删除单词：</h3><blockquote>
<p>dw：把光标停留在需要删除的单词前面，依次按下「d」「w」，即可</p>
<p>de：把光标停留在需要删除的单词前面（无视单词前面的空格），依次按下「d」「e」，即可</p>
</blockquote>
<h3 id="从当前光标处删除到行末"><a href="#从当前光标处删除到行末" class="headerlink" title="从当前光标处删除到行末"></a>从当前光标处删除到行末</h3><blockquote>
<p> 把光标停留在需要删除的句子前面，依次按下「d」「$」，即可</p>
</blockquote>
<h3 id="快速跳转到行首"><a href="#快速跳转到行首" class="headerlink" title="快速跳转到行首"></a>快速跳转到行首</h3><blockquote>
<p>按下数字「0」，即可</p>
</blockquote>
<h3 id="使用计数以删除单词"><a href="#使用计数以删除单词" class="headerlink" title="使用计数以删除单词"></a>使用计数以删除单词</h3><blockquote>
<p> 示例：this ABC DE line FGHI JK LMN OP of words is Q RS TUV cleaned up.</p>
<p> 依次将鼠标定位到ABC前，按「d」「2」「w」，可以删除：ABC DE</p>
<p> 将鼠标定位到FGHI前，按「d」「4」「w」，可以删除：FGHI JK LMN OP</p>
<p> 将鼠标定位到Q前，按「d」「3」「w」，可以删除：Q RS TUV</p>
<p> 得到句子：</p>
<p> this line of words is cleaned up.</p>
</blockquote>
<h3 id="删除当前行"><a href="#删除当前行" class="headerlink" title="删除当前行"></a>删除当前行</h3><blockquote>
<p>鉴于删除当前行这一操作的高频性，vim设计者简化了快捷键，按「d」「d」即可。</p>
<p>连续删除两行，从当前行开始，则为：「2」「d」「d」</p>
</blockquote>
<h3 id="撤销更改"><a href="#撤销更改" class="headerlink" title="撤销更改"></a>撤销更改</h3><blockquote>
<p>a. 按小写字母「u」，撤销上一步的更改操作；</p>
<p>b. 按大写字母「U」，撤销整行的更改操作；</p>
<p>c. 「Ctrl+R」撤销上一步「撤销操作」。</p>
</blockquote>
<h3 id="将刚删除的内容置入其他行"><a href="#将刚删除的内容置入其他行" class="headerlink" title="将刚删除的内容置入其他行"></a>将刚删除的内容置入其他行</h3><blockquote>
<p>之前刚刚删除的内容，会放入Vim编辑器的寄存器中。基于如此原理，可以将之认为成Windows操作系统的「剪切」操作。</p>
<p>先在想删除的行，按「d」「d」，进行删除操作；</p>
<p>再在想插入那行的前一行按「p」键即可。</p>
</blockquote>
<h3 id="替换"><a href="#替换" class="headerlink" title="替换"></a>替换</h3><blockquote>
<p>将光标放到需要改的字符前，先按「r」键，再输入想更改的字符即可。</p>
</blockquote>
<h3 id="跳转"><a href="#跳转" class="headerlink" title="跳转"></a>跳转</h3><blockquote>
<p>顶部跳转命令：先按「Control」+「g」键，在终端底部调出一栏，然后输入「g」「g」即可；</p>
<p>底部跳转命令：先按「Control」+「g」键，在终端底部调出一栏，然后输入大写字母「g」即可；</p>
<p>特定行跳转命令：直接输入行号，然后输入大写字母「g」即可。</p>
</blockquote>
<h3 id="查找命令"><a href="#查找命令" class="headerlink" title="查找命令"></a>查找命令</h3><h4 id="字符串查找："><a href="#字符串查找：" class="headerlink" title="字符串查找："></a>字符串查找：</h4><blockquote>
<p>输入英文斜杠「/」，后面紧接需要搜索的字符串即可。</p>
<p>查找下一个相同字符串，就紧接着按小写字母「n」；</p>
<p>查找上一个相同字符串，就紧接着按大写字母「N」。</p>
</blockquote>
<h4 id="配对括号查找："><a href="#配对括号查找：" class="headerlink" title="配对括号查找："></a>配对括号查找：</h4><blockquote>
<p>在编程语言里，配对括号「 ( 」「 ) 」「 { 」「 } 」很常见，当定位到一个配对括号的一半时（注意光标要定位在该括号之前），按「%」，即可自动跳转到与之匹配的第一个配对括号处。</p>
</blockquote>
<h3 id="替换字符串"><a href="#替换字符串" class="headerlink" title="替换字符串"></a>替换字符串</h3><p>当前行替换命令</p>
<blockquote>
<p>在标准命令行模式下，光标定位到当前行，按英文冒号「 ：」，再输入s/oldstring/newstring/g 回车，即可。</p>
<p>完整语句为：</p>
<p><strong>:s/dogg/dog/g</strong></p>
</blockquote>
<p>特定几行替换命令</p>
<blockquote>
<p>在标准命令行模式下，按英文冒号「 ：」，再输入#,#s/oldstring/newstring/g 回车，即可（其中#代表特定的首尾两行的行号）。</p>
<p>完整语句为：</p>
<p>**<em>*:*<em>5,8s/dogg/dog/g</em></em></p>
</blockquote>
<p>全文替换命令</p>
<blockquote>
<p>在标准命令行模式下，按英文冒号「 ：」，再输入%s/oldstring/newstring/g 回车，即可（其中#代表特定的首尾两行的行号）。</p>
<p>完整语句为：</p>
<p><strong><em>*:*</em>%s/dogg/dog/g</strong></p>
</blockquote>
<p>全文替换命令（每个匹配项替换前需确认）</p>
<blockquote>
<p>在标准命令行模式下，按英文冒号「 ：」，再输入%s/oldstring/newstring/gc 回车，即可（其中#代表特定的首尾两行的行号）。</p>
<p>完整语句为：</p>
<p><strong><em>*:*</em>%s/dogg/dog/gc</strong></p>
</blockquote>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">惜缘怀古</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://xiyuanhuaigu.gitee.io/2022/07/01/Vim%E6%8C%87%E4%BB%A4/">https://xiyuanhuaigu.gitee.io/2022/07/01/Vim%E6%8C%87%E4%BB%A4/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://xiyuanhuaigu.gitee.io" target="_blank">惜缘怀古的博客</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="/img/vimuser.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2022/07/01/Linux%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/"><img class="prev-cover" src="/img/linuxbinyi.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Linux编译环境配置</div></div></a></div><div class="next-post pull-right"><a href="/2022/05/19/netcat%E7%9A%84%E4%BD%BF%E7%94%A8/"><img class="next-cover" src="/img/nc.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">netcat的使用</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/img/2.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">惜缘怀古</div><div class="author-info__description">唯有那份炫目，未曾忘却</div></div><div class="card-info-data is-center"><div class="card-info-data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">66</div></a></div><div class="card-info-data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">0</div></a></div><div class="card-info-data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Vim-%E7%9A%84%E5%9F%BA%E6%9C%AC%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95"><span class="toc-number">1.</span> <span class="toc-text">Vim 的基本使用方法</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Vim%E5%BF%AB%E6%8D%B7%E9%94%AE%E7%BB%83%E4%B9%A0%E7%A5%9E%E5%99%A8%E2%80%94-VimTutor"><span class="toc-number">1.1.</span> <span class="toc-text">Vim快捷键练习神器—-VimTutor</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Vim%E7%9A%84%E4%B8%89%E7%A7%8D%E6%A8%A1%E5%BC%8F"><span class="toc-number">1.2.</span> <span class="toc-text">Vim的三种模式</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Vim%E7%9A%84%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9C"><span class="toc-number">2.</span> <span class="toc-text">Vim的基本操作</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E4%B8%8B%E7%9A%84%E5%8A%9F%E8%83%BD%E9%94%AE%EF%BC%88%E9%83%A8%E5%88%86%EF%BC%89"><span class="toc-number">3.</span> <span class="toc-text">命令行模式下的功能键（部分）</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8%E6%AF%8F%E8%A1%8C%E8%A1%8C%E9%A6%96%E6%B7%BB%E5%8A%A0%E7%9B%B8%E5%90%8C%E7%9A%84%E5%86%85%E5%AE%B9%EF%BC%9A"><span class="toc-number">3.0.1.</span> <span class="toc-text">在每行行首添加相同的内容：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8%E6%AF%8F%E8%A1%8C%E8%A1%8C%E5%B0%BE%E6%B7%BB%E5%8A%A0%E7%9B%B8%E5%90%8C%E7%9A%84%E5%86%85%E5%AE%B9%EF%BC%9A"><span class="toc-number">3.0.2.</span> <span class="toc-text">在每行行尾添加相同的内容：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%88%A0%E9%99%A4%E5%8D%95%E8%AF%8D%EF%BC%9A"><span class="toc-number">3.0.3.</span> <span class="toc-text">删除单词：</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BB%8E%E5%BD%93%E5%89%8D%E5%85%89%E6%A0%87%E5%A4%84%E5%88%A0%E9%99%A4%E5%88%B0%E8%A1%8C%E6%9C%AB"><span class="toc-number">3.0.4.</span> <span class="toc-text">从当前光标处删除到行末</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BF%AB%E9%80%9F%E8%B7%B3%E8%BD%AC%E5%88%B0%E8%A1%8C%E9%A6%96"><span class="toc-number">3.0.5.</span> <span class="toc-text">快速跳转到行首</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8%E8%AE%A1%E6%95%B0%E4%BB%A5%E5%88%A0%E9%99%A4%E5%8D%95%E8%AF%8D"><span class="toc-number">3.0.6.</span> <span class="toc-text">使用计数以删除单词</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%88%A0%E9%99%A4%E5%BD%93%E5%89%8D%E8%A1%8C"><span class="toc-number">3.0.7.</span> <span class="toc-text">删除当前行</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%92%A4%E9%94%80%E6%9B%B4%E6%94%B9"><span class="toc-number">3.0.8.</span> <span class="toc-text">撤销更改</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%B0%86%E5%88%9A%E5%88%A0%E9%99%A4%E7%9A%84%E5%86%85%E5%AE%B9%E7%BD%AE%E5%85%A5%E5%85%B6%E4%BB%96%E8%A1%8C"><span class="toc-number">3.0.9.</span> <span class="toc-text">将刚删除的内容置入其他行</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%9B%BF%E6%8D%A2"><span class="toc-number">3.0.10.</span> <span class="toc-text">替换</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%B7%B3%E8%BD%AC"><span class="toc-number">3.0.11.</span> <span class="toc-text">跳转</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%9F%A5%E6%89%BE%E5%91%BD%E4%BB%A4"><span class="toc-number">3.0.12.</span> <span class="toc-text">查找命令</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%9F%A5%E6%89%BE%EF%BC%9A"><span class="toc-number">3.0.12.1.</span> <span class="toc-text">字符串查找：</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E9%85%8D%E5%AF%B9%E6%8B%AC%E5%8F%B7%E6%9F%A5%E6%89%BE%EF%BC%9A"><span class="toc-number">3.0.12.2.</span> <span class="toc-text">配对括号查找：</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%9B%BF%E6%8D%A2%E5%AD%97%E7%AC%A6%E4%B8%B2"><span class="toc-number">3.0.13.</span> <span class="toc-text">替换字符串</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2023/11/06/2023%E8%93%9D%E5%B8%BD%E6%9D%AF%E5%86%B3%E8%B5%9BWP/" title="2023蓝帽杯决赛WP"><img src="https://xyhutc.oss-cn-qingdao.aliyuncs.com/giteetuchuang/20231106163334.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="2023蓝帽杯决赛WP"/></a><div class="content"><a class="title" href="/2023/11/06/2023%E8%93%9D%E5%B8%BD%E6%9D%AF%E5%86%B3%E8%B5%9BWP/" title="2023蓝帽杯决赛WP">2023蓝帽杯决赛WP</a><time datetime="2023-11-06T08:31:51.000Z" title="发表于 2023-11-06 16:31:51">2023-11-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/10/20/%E6%94%BB%E9%98%B2%E4%B8%96%E7%95%8CRE/" title="攻防世界RE"><img src="https://xyhutc.oss-cn-qingdao.aliyuncs.com/giteetuchuang/c78ed35b1e3999643d52a652257558af0a15b4c9_raw.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="攻防世界RE"/></a><div class="content"><a class="title" href="/2023/10/20/%E6%94%BB%E9%98%B2%E4%B8%96%E7%95%8CRE/" title="攻防世界RE">攻防世界RE</a><time datetime="2023-10-20T12:38:32.000Z" title="发表于 2023-10-20 20:38:32">2023-10-20</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/09/22/%E5%AE%89%E5%8D%93%E5%B8%B8%E7%94%A8%E7%9B%AE%E5%BD%95/" title="安卓常用目录"><img src="https://xyhutc.oss-cn-qingdao.aliyuncs.com/giteetuchuang/mmexport1694863328916.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="安卓常用目录"/></a><div class="content"><a class="title" href="/2023/09/22/%E5%AE%89%E5%8D%93%E5%B8%B8%E7%94%A8%E7%9B%AE%E5%BD%95/" title="安卓常用目录">安卓常用目录</a><time datetime="2023-09-22T01:27:02.000Z" title="发表于 2023-09-22 09:27:02">2023-09-22</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/09/22/010Editor%E7%A0%B4%E8%A7%A3/" title="010Editor破解"><img src="https://xyhutc.oss-cn-qingdao.aliyuncs.com/giteetuchuang/1694867487605.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="010Editor破解"/></a><div class="content"><a class="title" href="/2023/09/22/010Editor%E7%A0%B4%E8%A7%A3/" title="010Editor破解">010Editor破解</a><time datetime="2023-09-22T00:33:10.000Z" title="发表于 2023-09-22 08:33:10">2023-09-22</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/08/24/%E6%9F%90APP%E7%9A%84%E9%80%86%E5%90%91%E5%88%86%E6%9E%90/" title="某APP的逆向分析"><img src="https://xyhutc.oss-cn-qingdao.aliyuncs.com/giteetuchuang/a4c8982faff8839d06cc010c864e02e8092efb23_raw.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="某APP的逆向分析"/></a><div class="content"><a class="title" href="/2023/08/24/%E6%9F%90APP%E7%9A%84%E9%80%86%E5%90%91%E5%88%86%E6%9E%90/" title="某APP的逆向分析">某APP的逆向分析</a><time datetime="2023-08-24T14:02:11.000Z" title="发表于 2023-08-24 22:02:11">2023-08-24</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2024 By 惜缘怀古</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>